package com.pur.zsms.matermanage.mater.dao;

import java.math.BigDecimal;
import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.matermanage.mater.po.CheckMaterCostPo;
import com.pur.zsms.matermanage.mater.po.CheckMaterSalePo;
import com.pur.zsms.matermanage.mater.po.MaterLevelBlPo;
import com.pur.zsms.matermanage.mater.po.MaterLevelCblPo;
import com.pur.zsms.matermanage.mater.po.MaterLevelPo;
import com.pur.zsms.matermanage.mater.po.MaterPo;
import com.pur.zsms.matermanage.mater.po.MaterTypePo;
import com.pur.zsms.matermanage.mater.po.ShoppingCartMaterPo;
import com.pur.zsms.matermanage.mater.po.ShoppingCartMaterSelfPo;
import com.pur.zsms.matermanage.mater.po.ShoppingCartMaterSupplierPo;
import com.pur.zsms.matermanage.mater.po.UnitMaterConvertPo;
import com.pur.zsms.matermanage.mater.vo.MaterTypeVo;
import com.pur.zsms.matermanage.mater.vo.MaterValueVo;
import com.pur.zsms.matermanage.mater.vo.MaterVo;
import com.pur.zsms.matermanage.mater.vo.MaterVoForSup;
import com.pur.zsms.matermanage.mater.vo.MaterVoForUnit;
import com.pur.zsms.matermanage.mater.vo.ShoppingCartMaterVo;

public interface IMaterDao {

	/**
	 * 查询出所有用户信息
	 * 
	 * @param 查询条件封装在UserVo中
	 * @return
	 */
	public PaginationSupport listMater(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport listMaterUnit(PageController pageController, MaterVoForUnit materVo) throws GenericException;

	public PaginationSupport lookMaterUnit(PageController pageController, MaterVoForUnit materVo) throws GenericException;

	public PaginationSupport listMaterForSup(PageController pageController, MaterVoForSup materVo) throws GenericException;

	public PaginationSupport lookMaterValue(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport lookMaterValueCost(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport listEditorMater(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport listSelectMater(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport findMaterTypeForSup(PageController pageController, MaterTypeVo vo) throws GenericException;

	public List<Object[]> listSelectMaterForMobile(MaterVo materVo) throws GenericException;

	public List<Object[]> initShoppingMaterForMobile(MaterVo materVo) throws GenericException;

	public List<Object[]> listSelectMaterTypeForMobile(MaterTypeVo c) throws GenericException;

	public PaginationSupport listSelectMaterForBuySupplier(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport listSelectMaterSelf(PageController pageController, MaterVo materVo) throws GenericException;

	public PaginationSupport findShoppingCartMater(PageController pageController, ShoppingCartMaterVo shoppingCartMaterVo) throws GenericException;

	public PaginationSupport findShoppingCartMaterSupplier(PageController pageController, ShoppingCartMaterVo shoppingCartMaterVo)
			throws GenericException;

	public PaginationSupport findShoppingCartMaterSelf(PageController pageController, ShoppingCartMaterVo shoppingCartMaterVo)
			throws GenericException;

	public PaginationSupport findMaterId(PageController pageController, MaterVo materVo) throws GenericException;

	public int addMater(MaterPo c) throws GenericException;

	public void addMaterTypePo(MaterTypePo c) throws GenericException;

	public void updateMaterTypePo(MaterTypePo c) throws GenericException;

	public void addcheckMaterCostPo(CheckMaterCostPo c) throws GenericException;

	public void addUnitMaterConvertPo(UnitMaterConvertPo c) throws GenericException;

	public void updateUnitMaterConvertPo(UnitMaterConvertPo c) throws GenericException;

	public void addcheckMaterSalePo(CheckMaterSalePo c) throws GenericException;

	public void updatecheckMaterCostPo(CheckMaterCostPo c) throws GenericException;

	public void updatecheckMaterSalePo(CheckMaterSalePo c) throws GenericException;

	public void addShoppingCart(ShoppingCartMaterPo c) throws GenericException;

	public void updateShoppingCart(ShoppingCartMaterPo c) throws GenericException;

	public void addShoppingCartSelf(ShoppingCartMaterSelfPo c) throws GenericException;

	public void addShoppingCartSup(ShoppingCartMaterSupplierPo c) throws GenericException;

	public void deleteShoppingCartOne(ShoppingCartMaterVo c) throws GenericException;

	public void deleteShoppingCartOneSelf(ShoppingCartMaterVo c) throws GenericException;

	public void deleteShoppingCartSup(ShoppingCartMaterVo c) throws GenericException;

	public void deleteShoppingCartSupAll(int c) throws GenericException;

	public void deleteShoppingCartForCust(long shopId) throws GenericException;

	public void deleteShoppingCartForCustSelf(long shopId) throws GenericException;

	public int getMidMaterLevelByMaterId(String c) throws GenericException;

	public List<MaterLevelPo> getMidMaterLevelListByMaterId(String materId) throws GenericException;

	public List<MaterLevelPo> getAllMaterLevelList() throws GenericException;

	public List<MaterPo> getAllMaterList() throws GenericException;

	public List<MaterPo> getMaterPoByMaterName(String materName) throws GenericException;

	public List<MaterPo> getMaterPoByMaterNameUnitSpecificationsBrands(String materName, String unit, String specifications, String brands)
			throws GenericException;

	public List<MaterPo> getMaterPoByMaterId(int materId) throws GenericException;

	public List<MaterPo> getMaterPo(MaterVo materVo) throws GenericException;

	public List<MaterTypePo> getMaterTypePo(MaterTypeVo materTypeVo) throws GenericException;

	public List<CheckMaterCostPo> getCheckMaterCostPo(int supId, int materId) throws GenericException;

	public List<CheckMaterSalePo> getCheckMaterSalePo(int supId, int materId) throws GenericException;

	public List<UnitMaterConvertPo> getUnitMaterConvertPo(int supId, int materId) throws GenericException;

	public List<UnitMaterConvertPo> getUnitMaterConvertPobyHostMaterId(int supId, int materId) throws GenericException;

	public BigDecimal getMaterValueCostLast(int materId, long supId) throws GenericException;

	public BigDecimal getMaterValueRealLastByMaterId(int materId, int supId, long shopId) throws GenericException;

	public List<MaterPo> getMaterPoByBarcode(String barcode) throws GenericException;

	public List<CheckMaterCostPo> getCheckMaterCostPoById(int id) throws GenericException;

	public List<CheckMaterSalePo> getCheckMaterSalePoById(int id) throws GenericException;

	public List<ShoppingCartMaterPo> getShoppingCartMaterPo(int materId, long custId, long supId) throws GenericException;

	public List<ShoppingCartMaterPo> getShoppingCartMaterPo(long custId) throws GenericException;

	public List<ShoppingCartMaterSelfPo> getShoppingCartMaterSelfPo(int materId, long custId) throws GenericException;

	public List<ShoppingCartMaterSupplierPo> getShoppingCartMaterSupPo(int materId, long supId) throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterNameAndLevel(String materName, String Level, int supId) throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterNameUnitSpecificationsBrandsSupid(String materName, String unit, String specifications,
			String brands, int supId) throws GenericException;

	public List<Integer> getMaterLevelPoByMaterNameUnitSpecificationsBrandsSupidForUpdate(String materName, String unit, String specifications,
			String brands, int supId, int materType) throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterIdAndLevelAndSupId(int materId, int Level, int supId, String custId) throws GenericException;

	public List<Object> getMaterTypeBySupId(long supId) throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterId(int materId) throws GenericException;

	public List<MaterLevelBlPo> getMaterLevelBlPoByMaterIdAndLevelAndSupId(int materId, int Level, int supId, String day, String custId)
			throws GenericException;

	public List<MaterLevelCblPo> getMaterLevelCblPoByMaterIdAndSupIdAndMaterDay(int materId, int supId, String day) throws GenericException;

	public List<MaterLevelBlPo> getMaterLevelBlPoByMaterIdAndSupIdAndMaterDay(int materId, int supId, String materDay) throws GenericException;

	public void updateMater(MaterPo c) throws GenericException;

	public void updateMaterLevel(MaterLevelPo c) throws GenericException;

	public void addMaterLevel(MaterLevelPo c) throws GenericException;

	public void addMaterLevelPersist(MaterLevelPo c) throws GenericException;

	public void addMaterLevelBl(MaterLevelBlPo c) throws GenericException;

	public void addMaterLevelCbl(MaterLevelCblPo c) throws GenericException;

	public void updateMaterLevelBl(MaterLevelBlPo c) throws GenericException;

	public void updateMaterLevelCbl(MaterLevelCblPo c) throws GenericException;

	public void deleteMaterLevel(MaterLevelPo materLevelPo) throws GenericException;

	public void deleteMaterUnitHostMaterId(int materId, int supId) throws GenericException;

	public void deleteMaterUnitAuxiliaryMaterId(int materId, int supId) throws GenericException;

	public void deleteMaterUnit(int materId, long supId) throws GenericException;

	/**
	 * 根据materid查寻菜单信息
	 * 
	 * @param foodName
	 * @return
	 */
	public MaterPo listMaterPoByMaterId(String materId) throws GenericException;

	public MaterLevelPo listMaterLevelPoByMaterId(String materId) throws GenericException;

	public MaterLevelPo listMaterLevelPoByMaterIdSupIdLevelIdCustId(String materId, String supId, String materLevel, int custId)
			throws GenericException;

	public List<MaterLevelPo> getMaterLevelValue(int materId) throws GenericException;

	public List<MaterLevelBlPo> listMaterLevelBlPoByMaterIdSupIdLevelId(MaterValueVo materValueVo) throws GenericException;

	public List<MaterLevelCblPo> listMaterLevelBlPoForMaterCost(MaterValueVo materValueVo) throws GenericException;

	public List<Object[]> getAllExcelMater() throws GenericException;

	public List<Object[]> getAllExcelMaterCust(long userId) throws GenericException;

}
